package com.sizu.web;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sizu.common.statisticaldto.TSupplierStatementDto;
import com.sizu.common.vo.ResultEntity;
import com.sizu.entity.TCustomerStatementZyx;
import com.sizu.entity.TSupplierStatementZyx;
import com.sizu.service.ITSupplierStatementService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 赵玉玺
 * @since 2020-02-29
 */
@RestController
@RequestMapping("/statistical/tSupplierStatement")
public class TSupplierStatementController {

    @Resource
    private ITSupplierStatementService itSupplierStatementService;

    /**
     * 查询供应商统计列表
     * @param tSupplierStatementDto
     * @return
     */
    @RequestMapping("/list")
    public ResultEntity tSupplierStatementList(TSupplierStatementDto tSupplierStatementDto){
        TSupplierStatementZyx tSupplierStatementZyx=new TSupplierStatementZyx();
        BeanUtils.copyProperties(tSupplierStatementDto,tSupplierStatementZyx);
        List<TSupplierStatementZyx> tSupplierStatementZyxs = itSupplierStatementService.getSupplierStatementList(tSupplierStatementZyx);
        return ResultEntity.ok("查询成功",tSupplierStatementZyxs);
    }

}
